/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.stock.entity;

import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.google.common.collect.Lists;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 仓库Entity
 * @author 仓库
 * @version 2019-12-22
 */
public class Warehouse extends DataEntity<Warehouse> {
	
	private static final long serialVersionUID = 1L;
	private String code;		// 编码
	private String name;		// 名称
	private List<WarehouseLoc> warehouseLocList = Lists.newArrayList();		// 子表列表
	
	public Warehouse() {
		super();
	}

	public Warehouse(String id){
		super(id);
	}

	@Length(min=0, max=10, message="编码长度必须介于 0 和 10 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=200, message="名称长度必须介于 0 和 200 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public List<WarehouseLoc> getWarehouseLocList() {
		return warehouseLocList;
	}

	public void setWarehouseLocList(List<WarehouseLoc> warehouseLocList) {
		this.warehouseLocList = warehouseLocList;
	}
}